package com.ruoyi.quartz.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.quartz.service.ICornLogService;
import com.ruoyi.quartz.service.ITaskService;
import com.ruoyi.system.domain.vo.CornLog;
import com.ruoyi.system.domain.vo.OrderJobVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.List;

/**
 * 订单信息
 * 
 */
@Controller
@RequestMapping("/business/task")
public class TaskController extends BaseController
{
    private String prefix = "business/task";

    @Autowired
    private ITaskService iTaskService;

    @GetMapping()
    public String dept() {
        return prefix + "/task";
    }

    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(OrderJobVo orderJobVo) {
        List<OrderJobVo> orderJobVoList = new ArrayList<OrderJobVo>();

        startPage();
        orderJobVoList = iTaskService.list(orderJobVo);
        return getDataTable(orderJobVoList);
    }


}
